import threading
import time

event = threading.Event()

def func():
    
    print ("%s wait now is : %s "%(threading.currentThread().getName(),time.asctime()))
    time.sleep(2)
    event.wait()
    print ("%s load "%threading.currentThread().getName())

t1 = threading.Thread(target=func)
t2 = threading.Thread(target=func)
t3 = threading.Thread(target=func)
t4 = threading.Thread(target=func)
t5 = threading.Thread(target=func)
t6 = threading.Thread(target=func)
t7 = threading.Thread(target=func)
t8 = threading.Thread(target=func)
t9 = threading.Thread(target=func)
t10 = threading.Thread(target=func)

t1.start()
t2.start()
t3.start()
t4.start()
t5.start()
t6.start()
t7.start()
t8.start()
t9.start()
t10.start()

time.sleep(2)

print ("Main thread set event")
event.set()
